﻿using System;
using System.Collections.Generic;

using System.Text;

namespace RoughJs.Ast
{
    public abstract class RegExpProxy
    {
        // Types of regexp actions

        public static int RA_MATCH = 1;
        public static int RA_REPLACE = 2;
        public static int RA_SEARCH = 3;

        public abstract bool isRegExp(Scriptable obj);

        public abstract Object compileRegExp(Context cx, String source, String flags);

        public abstract Scriptable wrapRegExp(Context cx, Scriptable scope,
                                     Object compiled);

        public abstract Object action(Context cx, Scriptable scope,
                             Scriptable thisObj, Object[] args,
                             int actionType);

        public abstract int find_split(Context cx, Scriptable scope, String target,
                              String separator, Scriptable re,
                              int[] ip, int[] matchlen,
                              bool[] matched, String[][] parensp);
    }
}
